from homework2.Base import Base
from selenium.webdriver.common.by import By

class Page(Base):
    new_loc = (By.XPATH,'/html/body/div/div[2]/div[2]/a[1]')
    def new(self):
        self.click(self.new_loc)

    map_loc = (By.XPATH,'/html/body/div/div[2]/div[2]/a[3]')
    def map(self):
        self.click(self.map_loc)

    tie_loc = (By.XPATH,'/html/body/div/div[2]/div[2]/a[4]')
    def tie(self):
        self.click(self.tie_loc)

    video_loc = (By.XPATH,'//*[@id="s-top-left"]/a[5]')
    def video(self):
        self.click(self.video_loc)

    search_loc = (By.ID,'chat-textarea')
    def search(self):
        self.send_keys(self.search_loc,'我喜欢软件测试')

    search_btn = (By.XPATH,'/html/body/div/div[2]/div[5]/div[1]/div/div[2]/div/div/div/div/div[1]/div[4]/div[1]/div[3]/div[3]/button')
    def searchbtn(self):
        self.click(self.search_btn)

    click_loc = (By.XPATH,'/html/body/div[3]/div[3]/div[2]/div/div/a[2]/span')
    def two(self):
        self.click(self.click_loc)